package mx.edu.um.exodus.proveedores.control;

import mx.edu.um.exodus.dao.ProveedorDao;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.portlet.ModelAndView;
import org.springframework.web.portlet.bind.annotation.RenderMapping;

/**
 *
 * @author jdmr
 */
@Controller
@RequestMapping("VIEW")
public class ProveedorController {
    private static final Log log = LogFactory.getLog(ProveedorController.class);
    @Autowired
    private ProveedorDao proveedorDao;

    @RenderMapping
    public ModelAndView list() {
        log.debug("Lista de proveedores");
        return new ModelAndView("list","proveedores",proveedorDao.lista());
    }

}
